# Notifications

You can select events, on the occurrence of which, a notification will be sent to the specified recipients.

Information note

Notifications will not be sent unless the [mail server settings](https://help.qlik.com/en-US/compose/December2024/Content/ComposeDWDL/Main/DW/Manage%20Compose/mail_server_setting.htm) are correctly defined.

## Setting notifications

To set a notification rule:

1. Switch to **Monitor** view.

2. Click the **Notifications** toolbar button.

   The **Notification Rules** window opens.

3. Click the **New** toolbar button.

   The **New Notification** wizard opens.

4. In the **Events** screen:

   * Specify a name for the notification
   * Choose for which type of events you want the notification to be sent, both at the task level and at the workflow level.

5. Click **Next**. In the **Recipients** screen:

   * Select **Windows Event** to send the notification to Windows Event Log and/or **Recipients** to send the notification to a list of email recipients.

     See also: [Notifications](https://help.qlik.com/en-US/compose/December2024/Content/ComposeDWDL/Main/DL/Tasks%20and%20Workflows/define_notifications_rules.htm#).

   * If you selected **Recipients**, enter the recipient email addresses in the **To**, **Cc** (optional) and **Bcc** (optional) boxes. Multiple addresses must be separated by a semi-colon.

6. Click **Next**. In the **Message** screen, optionally, edit the default notification message. You can add variables to the message by selecting the variable on the right and then clicking the arrow to the left of the variables list.

   The following variables are available:

   | **Variable** | **Description** |
   | --- | --- |
   | ${PROJECT} | The name of the Compose project in which the event occurred. |
   | ${TASK\_NAME} | The name of the task in which the event occurred. |
   | ${INSERTED} | The number of rows inserted in the Storage Zone. |
   | ${UPDATED} | The number of rows updated in the Storage Zone. |
   | ${DELETED} | The number of rows deleted from the Storage Zone. |
   | ${ERROR\_CODE} | The error code if an error was encountered during the task. |
   | ${ERROR\_DETAILS} | The error message if an error was encountered during the task. |
   | ${EVENT\_TYPE} | The event type (Started, Error or Completed). |
   | ${EVENT\_TYPE\_DESCRIPTION} |  |
   | ${EVENT\_TIME} | The date and time the event occurred. |
   | ${LINK} | A link to the relevant Compose project. |

7. Click **Next**. In the **Apply to** screen, select whether to apply the rule to all tasks of to selected tasks. If you chose **Selected Tasks**, select which tasks to apply the rule to.

8. Click **Next** to see a summary of the notification settings or **Finish** to save your settings and exit the wizard.

9. If you clicked **Next**, review your settings and then click **Finish** to save the notification rule and exit the wizard or **Prev** to edit your settings. You can also click the headings on the right of the wizard to go directly to a specific window.

   The notification will be added to the list of notifications in the Notification Rules window.

## Managing notification rules

In the **Notification Rules** window, you can edit, delete and enable/disable notification rules as described in the table below.

| **To** | **Do This** |
| --- | --- |
| Delete a Rule | Select the rule and then click the **Delete** toolbar button. When prompted to confirm the deletion, click **Yes**. |
| Edit a Rule | Either double-click the rule you want to edit or select the rule and click the **Edit** toolbar button. Continue from [Notifications](https://help.qlik.com/en-US/compose/December2024/Content/ComposeDWDL/Main/DL/Tasks%20and%20Workflows/define_notifications_rules.htm#). |
| Disable a Rule | Select the rule you want to disable and then either click the **Disable** toolbar button or clear the check box in the **Enabled** column. |
| Enable a Rule | Select the rule you want to enable and then click the **Enable** toolbar button or select the check box in the **Enabled** column. |

## Event IDs in Windows Event Log

The table below lists the Event IDs for Compose events in Windows Event Log.

Information note

If a notification is set for several events, the event ID will be 0 for each of the events.

Windows Event Log IDs

| Event ID | Description |
| --- | --- |
| 261 | The task ended with error |
| 400 | The task has started. |
| 406 | The task completed successfully. |